#! /usr/bin/python
# A Python script that simulates rolling two dice a few times.

# Module for dealing with random numbers.
import random


# Number of times to roll the dice.
DICE_ROLLS = 0
doublesix = False

NUMSIDES = 6

def RollDice():
	return random.randint(1, int(NUMSIDES))

print 'Content-Type: text/plain'
print ''

while doublesix == False:
	# Simulate rolling two dice.
	dice_1 = RollDice()
	dice_2 = RollDice()
	print "Rolls:", dice_1, dice_2

	DICE_ROLLS= DICE_ROLLS +1
	if dice_1 == dice_2:

		if dice_1 ==1:
			print "Got snake eyes!"

		if dice_1 == 6:
			print "Got double sixes!"
			doublesix= True


print "Rolling the dice " + str(DICE_ROLLS) + " times"
